package com.xiaoc.bulldozer.common.dto;

import com.xiaoc.bulldozer.common.model.Award;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * Award Dto
 *
 * @author Danfo Yam
 *
 * @date 2018-08-24 15:47:58
 */
public class AwardDto extends Award {
    
    private static final long serialVersionUID = 1L;

    private int isNewAward;
    
    private String nickName;

    private String phoneNumber;

    public int getIsNewAward() {
        return isNewAward;
    }

    public void setIsNewAward(int isNewAward) {
        this.isNewAward = isNewAward;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {

        if (StringUtils.isEmpty(nickName)) {
            this.nickName = nickName;
        }else {
            this.nickName = nickName.replaceAll("\\\\", "\\\\\\\\");
        }


    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this,
                ToStringStyle.SHORT_PREFIX_STYLE);
    }
}
